#!/bin/bash
str=`ss -4tlnp|awk 'NR>1 {sl=split($4,s,":");al=split($6,a,"\"");if (s[sl-1]!="127.0.0.1") print "\""s[sl]"_"a[al-1]"\":""\"""OK""\""","}'|sort|uniq`
str="'check_service'=>'{"$str"}'||"
echo $str|sed "s/,}'||/}'||/g;s/ //g"
